1. Field of the Invention
The present invention relates to a terminating apparatus for an ATM (asynchronous transfer mode) adaptation layer, which is a layer in ATM communication to provide matching and adjusting services between a higher application layer and an ATM layer that collectively handles ATM cells containing 48-byte user data. In particular, the present invention relates to a terminating apparatus, made of hardware logic circuits, to serve in the ATM adaptation layer.
2. Description of the Related Art
ATM communication transfers cells each consisting of a 5-byte header and 48-byte fixed-length data, and the higher application layer transfers variable-length data in the range of several bytes to several kilobytes. There is a necessity of, therefore, dividing the variable-length data into the fixed-length cells and assembling the fixed-length cells into the variable-length data.
These dividing and assembling operations are carried out according to standardized ATM adaptation layer (AAL) protocols.
Presently, AAL protocols of types 1 to 5, are standardized. Among them, the AAL type 5 protocol is simple and is widely used for ATM-LANs.
FIG. 1 shows a frame format of the AAL type 5 protocol. Each cell in an ATM layer has a cell header that contains a payload type indication (PTI). The PTI is used to determine whether or not the cell is the last cell of an AAL message of the ATM adaptation layer. Cells shown in A of FIG. 1 are sequentially received and, according to reception order, 48-byte fixed-length payloads of the cells are extracted to form an AAL message of B of FIG. 1. The ATM adaptation layer is terminated when the last cell of the AAL message is received. In FIG. 1, a number xe2x80x9cxxe2x80x9d indicated as (x) represents the number of bytes.
One AAL message is made of {circle around (1)} user data, {circle around (2)} PAD (padding that is meaningless data used to adjust the length of the AAL message to the total length of-cells), {circle around (3)} CPCS-UU (common part convergence sublayer user-to-user indication), {circle around (4)} CPI (common part indication, {circle around (5)} the length of the user data, and {circle around (6)} CRC (cyclic redundancy check) code used to find bit errors between the start of the AAL message and a field in front of the CRC field. The fields {circle around (3)} to {circle around (5)} form an AAL trailer.
The decomposition and assembling of an AAL message is called SAR (segmentation and reassembly). The present invention provides a terminating apparatus for the ATM adaptation layer, employing hardware logic circuits that are optimum for SAR.
The ATM communication shares each channel among cells of many users. To transfer cells from a first user to a second user, the ATM communication sets a virtual connection between the first and second users and adds data to identify the virtual connection to each cell to be transferred from the first user to the second user.
The virtual connection established between the first and second users is identifiable with a VPI (virtual path identifier) and a VCI (virtual channel identifier) that are contained in the header of each cell transferred between the first and second users. Hereinafter, the VPI and VCI are referred to as VPI/VCI. The terminating of the ATM adaptation layer is carried out for each connection according to VPI/VCI contained in each cell header.
FIG. 2 is a block diagram showing a terminating apparatus for an ATM adaptation layer employing hardware logic circuits according to a prior art. A physical layer terminator 2-1 receives cells, terminates a physical layer of the cells, and transfers the cells as ATM-layer cells to a header detector 2-2.
The header detector 2-2 finds a cell header in each cell, picks up VPI/VCI from the cell header, identifies a connection of the cell, and transfers the cell to a CRC unit 2-3 assigned to the connection. The header detector 2-2 also picks up a payload type indication (PTI) from the cell header and determines whether or not the cell is the last cell of an AAL message.
The number of the CRC units 2-3 is equal to the number of connections to be simultaneously set. Namely, the prior art must arrange the CRC units 2-3 for simultaneous connections, respectively. Each CRC unit 2-3 carries out a cyclic redundancy check on the payload of a received cell and stores the payload in a corresponding reception buffer 2-4.
When the header detector 2-2 detects the last cell of an AAL message related to a given connection, the assembling of the AAL message in the corresponding reception buffer 2-4 is completed, and the given connection is terminated in the ATM adaptation layer.
Cells are multiplexed and demultiplexed through a cross connection apparatus, etc., and a transmission sequence of cells of each connection is secured. However, a plurality of connections are randomly set in the same transmission line, and therefore, the number of the CRC units 2-3 must be equal to the number of connections to be simultaneously terminated.
As explained above, it is easy to form a terminating apparatus for each connection for the ATM adaptation layer with hardware logic circuits. If the number of connections to simultaneously terminate increases, the prior art must increase the number of termination circuits including the CRC units 2-3 and reception buffers 2-4 to cope with the increased number of connections. This enlarges the scale of the apparatus.
Namely, the prior art has limits on a packaging scale and the number of connections to simultaneously terminate. To cope with this, firmware may be employed to handle connections above the limit of hardware logic terminating circuits.
FIG. 3 is a block diagram showing a terminating apparatus according to a prior art employing firmware for terminating connections in the ATM adaptation layer. A physical layer terminator 3-1 receives cells, terminates a physical layer of the cells, and stores ATM layer cells in a reception buffer 3-2.
A microprocessor (MPU) 3-3 has the firmware to read the cells from the reception buffer 3-2, carries out segmentation and reassembly processes for each connection, and terminates the ATM adaptation layer of each connection.
According to the structure of FIG. 3, the number of connections to terminate is independent of hardware scale. The speed of the segmentation and reassembly processes, however, is dependent on the capacity of the MPU 3-3. As the speed of input cells increases, the MPU 3-3 must operate at higher speeds. Since the processing speed of the MPU 3-3 is limited, the speed of input cells must be limited.
In this way, the prior art of FIG. 2 must prepare hardware logic circuits for each of connections to be simultaneously set and terminated in the ATM adaptation layer. If the number of simultaneous connections is increased, the prior art must increase the amount of the hardware. Namely, the prior art has a limit on the number of connections to terminate.
On the other hand, the prior art of FIG. 3 that employs firmware to terminate the ATM adaptation layer involves a slow processing speed, and therefore, is inapplicable to cells transferred at high speeds.
An object of the present invention is to provide a terminating apparatus for the ATM adaptation layer for terminating connections that are simultaneously set. The apparatus is made of hardware logic circuits whose number is independent of the number of-connections to terminate. The apparatus is compact and realizes high-speed termination.
In order to accomplish the object, a first aspect of the present invention provides a terminating apparatus for an ATM adaptation layer for terminating received cells connection by connection and assembling an ATM adaptation layer message, for each connection, from data contained in the received cells. The apparatus has a header extractor for extracting VPI/VCI from a received cell, a CRC unit shared by cells of different connections, a reception processor for determining, based on a payload type indication (PTI) contained in the header of the received cell, whether or not the received cell is the last cell of an ATM adaptation layer message prepared for a connection related to the received cell and processing the received cell, a work memory for storing, for each connection, a CRC result and the number of received cells, and a reception buffer for sequentially storing, for each connection, data extracted from received cells.
According to a second aspect of the present invention, the work memory has, for each connection, a part for storing an address of the reception buffer where the latest data received for the connection is stored. Whenever a cell related to the connection is received, the reception processor reads the address and stores data extracted from the received cell into the reception buffer at an address just after the read address.
According to a third aspect of the present invention, the header extractor, CRC unit, and reception processor are common to all connections to terminate. The work memory and reception buffer are each a memory that is expandable to cover an increase in the number of connections to terminate.
According to a fourth aspect of the present invention, the reception processor determines whether the received cell is at the start, or in the middle, or at the end of the corresponding connection according to the determination whether or not the received cell is the last cell of the ATM adaptation layer message, updates a CRC result and the number of received cells of the corresponding connection in the work memory, and processes a payload of the received cell. The apparatus also has a DMA controller for transferring, for each connection, a CRC result between the CRC unit and the work memory according to VPI/VCI extracted by the header extractor and transferring data extracted from a received cell to the reception buffer according to an instruction from the reception processor.
According to a fifth aspect of the present invention, the reception processor determines that the received cell is the start cell of the ATM adaptation layer message if the number of received cells of the corresponding connection is zero and if the received cell is not the last cell of the ATM adaptation layer message, operates the CRC unit from an initial state, stores a CRC result in a corresponding area of the work memory, and increments the number of received cells by one. The reception processor determines that the received cell is an intermediate cell of the ATM adaptation layer message if the number of received cells of the corresponding connection is not zero and if the received cell is not the last cell of the ATM adaptation layer message, reads a CRC result acquired on the preceding cell from the corresponding area of the work memory, loads the read CRC result to the CRC unit, operates the CRC unit accordingly, updates the CRC result in the work memory accordingly, and increments the number of received cells by one. The reception processor assembles the ATM adaptation layer message from data sequentially stored in the reception buffer for the corresponding connection if the received cell is the last cell of the ATM adaptation layer message and resets the CRC result and the number of received cells in the corresponding area of the work memory to zero.
According to a sixth aspect of the present invention, the reception processor compares, if the received cell is the last cell of the ATM adaptation layer message, the number of cells received in connection with the corresponding connection stored in the corresponding area of the work memory with a user data length stored in a trailer of the assembled ATM adaptation layer message, and determines whether or not the data length of the assembled ATM adaptation layer message is correct.
According to a seventh aspect of the present invention, the reception processor refers to the user data length stored in the trailer of the assembled ATM adaptation layer message and separately stores the user data and trailer of the message in the reception buffer.
According to an eighth aspect of the present invention, the ATM adaptation layer message is a message of the ATM adaptation layer type 5 protocol.